import request from '@/plugins/request';

export const getPublicConfig = (data) => {
  return request({
    url: '/fetchPubConfig',
    method: 'post',
    data
  })
}

export const addUser = (data) => {
  return request({
    url: '/user/add',
    method: 'post',
    data
  })
}

export const modifyPassword = (data) => {
  return request({
    url: '/user/modifyPwd',
    method: 'post',
    data
  })
}

export const getUserInfo = () => {
  return request({
    url: '/user/fetchUserInfo',
    method: 'post'
  })
}

export const getUserInfoById = (data) => {
  return request({
    url: '/user/fetchUserInfoById',
    method: 'post',
    data
  })
}

export const getUserList = (data) => {
  return request({
    url: '/user/partnerListV2',
    method: 'post',
    data
  })
}

export const getVUserList = (data) => {
  return request({
    url: '/user/partnerListVUser',
    method: 'post',
    data
  })
}

export const getAllocateUsers = (data) => {
  return request({
    url: '/user/allocateUserList',
    method: 'post',
    data
  })
}

export const modifyUserType = (data) => {
  return request({
    url: '/user/modifyUserType',
    method: 'post',
    data
  })
}

export const fireUser = (data) => {
  return request({
    url: '/user/fireUser',
    method: 'post',
    data
  })
}

export const deactivateUser = (data) => {
  return request({
    url: '/user/deactivateUser',
    method: 'post',
    data
  })
}

export const saveSipInfo = (data) => {
  return request({
    url: '/user/saveSipInfo',
    method: 'post',
    data
  })
}

export const clearSipInfo = (data) => {
  return request({
    url: '/user/clearSipInfo',
    method: 'post',
    data
  })
}

export const resetPassword = (data) => {
  return request({
    url: '/user/resetPwd',
    method: 'post',
    data
  })
}

export const updateBasicMessage = (data) => {
  return request({
    url: '/user/updateBasicMessage',
    method: 'post',
    data
  })
}

export const getCallLineConfig = (data) => {
  return request({
    url: '/user/callLineConfig',
    method: 'post',
    data
  })
}

export const getHomeData = (data) => {
  return request({
    url: '/user/home',
    method: 'post',
    data
  })
}

export const updateUserInfo = (data) => {
  return request({
    url: '/user/update',
    method: 'post',
    data
  })
}